a = ["mb","kl","ibkc","ibkb","zde","merge","scanline","camera","filtererode","cc","id","pri","stmap","glow", "grain","denoise","idis","lensdis","cnp","addmix"]
b =  ["MotionBlur","OFXuk.co.thefoundry.keylight.keylight_v201","IBKColourV3","IBKGizmoV3","ZDefocus2","Merge2","ScanlineRender","Camera2","FilterErode","ColorCorrect","IDistort","Primatte","STMap","Glow2","Grain2","Denoise2","IDistort","LensDistortion","CornerPin2D","AddMix"]
lens = len(a)
def Enabller():
    import nuke
  
    
    Enabller_type = nuke.getInput("Please input the node you wanna Enable : ","blur")
    if not Enabller_type == None:
        judge = False
        for  i in range(lens):
            if a[i] == Enabller_type:
                judge = True
                break
                
        if judge:
            Enabller_type = b[i]
        else:
            Enabller_type = Enabller_type.capitalize()

        counter = 0
        cell = []
        for i in nuke.selectedNodes():
            counter+=1
            cell.insert(0,i)
        if counter == 0:
            for j in nuke.allNodes():
                if j.Class() == Enabller_type:
                    j['disable'].setValue(0)
        else:
            for i in cell:
                if i.Class() == Enabller_type:
                    i['disable'].setValue(0)